package io.github.wanggit.antrpc.console.web.utils;

import java.util.Objects;

public abstract class LoadBalancerUtil {

    public static final String[] lbs =
            new String[] {
                "io.github.wanggit.antrpc.client.zk.lb.RandomLoadBalancer",
                "io.github.wanggit.antrpc.client.zk.lb.RoundLoadBalancer"
            };

    public static boolean checkLoadBalancerValid(String loadBalancer) {
        for (int i = 0; i < lbs.length; i++) {
            if (Objects.equals(lbs[i], loadBalancer)) {
                return true;
            }
        }
        return false;
    }
}
